const SettingModel = require("./models/SettingModel");

// 获取全局设置
module.exports.getSetting = async function () {
    const data = await SettingModel.findOne();
    return data ? data.toJSON() : data;
}

// 修改全局设置
module.exports.updateSetting = async function (settingInfo) {
    return await SettingModel.update(settingInfo, {
        where: {}
    });
}